﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Store.Models
{
    public class User : BaseEnity
    {
        [StringLength(30)]
        public string Name { get; set; } = "秋秋秋";

        [StringLength(40), Required]
        public string LoginName { get; set; }

        [StringLength(40), Required]
        public string Password { get; set; }

        [StringLength(40)]
        public string NickName { get; set; }

        [StringLength(50)]
        public string Mailbox { get; set; }
        public int State { get; set; } = (int)Store.Models.Enum.UserState.普通用户;

        /// <summary>
        /// 商品评价
        /// </summary>
        public List<GoodsEvaluate> Goods { get; set; }

        /// <summary>
        /// 收藏夹
        /// </summary>
        public List<Favorite> Favorites{ get; set; }

        /// <summary>
        /// 购物车
        /// </summary>
        public List<ShoppingTrolley> ShoppingTrolleys{ get; set; }

        /// <summary>
        /// 收货地址
        /// </summary>
        public List<ShippingAddress> ShippingAddresses{ get; set; }

        /// <summary>
        /// 订单表
        /// </summary>
        public List<Order> Orders{ get; set; }
    }
}
